package main.model;

import java.awt.Point;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class LayoutComponents {

	private Map<Component, Point> layout;
	
	public LayoutComponents(){
		this.setLayout(new HashMap<Component, Point>());
	}

	public void setNewPointToComponent(Component component, Point p) {
		getLayout().get(component).setLocation(p);
	}
	
	public Point getPositionComponent(Component component){
		return getLayout().get(component);
	}

	public Map<Component, Point> getLayout() {
		return layout;
	}

	public void setLayout(Map<Component, Point> layout) {
		this.layout = layout;
	}

	public Iterator<Component> iterator() {
		return this.layout.keySet().iterator();
	}
	
	
	
}
